<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<!--suppress HtmlRequiredTitleElement -->
<head>
    <th:block th:include="include :: header('系统访问记录')"/>
</head>
<body class="layui-layout-body theme-himio layui-anim layui-anim-upbit">
<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表格工具栏 -->
            <form class="layui-form toolbar">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">登录账号:</label>
                        <div class="layui-input-inline">
                            <input name="loginName" class="layui-input" placeholder="请输入登录账号"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">登录地点:</label>
                        <div class="layui-input-inline">
                            <input name="loginLocation" class="layui-input" placeholder="请输入登录地点"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">登录状态:</label>
                        <div class="layui-input-inline">
                            <label>
                                <select name="status" th:with="type=${@dict.getType('sys_common_status')}">
                                    <option value="">全部</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </label>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">访问时间:</label>
                        <div class="layui-input-inline">
                            <input name="loginTime" lay-date lay-date-range class="layui-input icon-date"
                                   placeholder="选择日期范围" autocomplete="off" style="width: 210px;"/>
                        </div>
                    </div>
                    <div class="layui-inline">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="loginInfoTbSearch" lay-submit>
                            <i class="layui-icon layui-icon-search"></i>搜索
                        </button>
                    </div>
                </div>
            </form>
            <!-- 数据表格 -->
            <table id="loginInfoTable" lay-filter="loginInfoTable"></table>
        </div>
    </div>
</div>

<!-- 表单弹窗 edit -->
<script type="text/html" id="loginInfoEditDialog">
    <form id="loginInfoEditForm" lay-filter="loginInfoEditForm" class="layui-form model-form">
        <input name="infoId" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label">登录账号:</label>
            <div class="layui-input-block">
                <input type="text" name="loginName" placeholder="请输入登录账号" class="layui-input" lay-verType="tips"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">登录IP地址:</label>
            <div class="layui-input-block">
                <input type="text" name="ipAddr" placeholder="请输入登录IP地址" class="layui-input" lay-verType="tips"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">登录地点:</label>
            <div class="layui-input-block">
                <input type="text" name="loginLocation" placeholder="请输入登录地点" class="layui-input" lay-verType="tips"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">浏览器类型:</label>
            <div class="layui-input-block">
                <input type="text" name="browser" placeholder="请输入浏览器类型" class="layui-input" lay-verType="tips"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作系统:</label>
            <div class="layui-input-block">
                <input type="text" name="os" placeholder="请输入操作系统" class="layui-input" lay-verType="tips"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">登录状态:</label>
            <div class="layui-input-block">
                <label>
                    <select name="status" th:with="type=${@dict.getType('sys_common_status')}">
                        <option value="">全部</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                                th:selected="${dict.default}"></option>
                    </select>
                </label>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">提示消息:</label>
            <div class="layui-input-block">
                <input type="text" name="msg" placeholder="请输入提示消息" class="layui-input" lay-verType="tips"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">访问时间:</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="loginTime" readonly="readonly" lay-date/>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="loginInfoEditSubmit" lay-submit>保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>


<!-- js部分 -->
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var addFlag = [[${@permission.hasPermit('monitor:loginInfo:add')}]];
    var editFlag = [[${@permission.hasPermit('monitor:loginInfo:edit')}]];
    var removeFlag = [[${@permission.hasPermit('monitor:loginInfo:remove')}]];
    var exportFlag = [[${@permission.hasPermit('monitor:loginInfo:export')}]];
    var dictSysCommonStatus = [[${@dict.getType('sys_common_status')}]];
    var prefix = ctx + "monitor/loginInfo";
</script>
<script th:src="@{/static/assets/system/js/loginInfo.js}"></script>
</body>
</html>

